-
Time of writing: Jan 18, 2023. The following assume you're trying to install CUDA on WSL2 Ubuntu.
-
Check support matrix first before you install any version of CUDA, because chances are the latest CUDA does not have cuDNN support yet, then you'll have to re-install older version if you found out later.
https://docs.nvidia.com/deeplearning/cudnn/support-matrix/index.html#cudnn-cuda-hardware-versions
At the time of writing, the latest cuDNN version is 8.7 and it supports CUDA 11.8.
-
Windows 10 must be build
20145
or later.
Discover gists
# output binary | |
BIN := test | |
# source files | |
SRCS := \ | |
test.cpp | |
# files included in the tarball generated by 'make dist' (e.g. add LICENSE file) | |
DISTFILES := $(BIN) |
//**dataURL to blob** | |
function dataURLtoBlob(dataurl) { | |
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1], | |
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n); | |
while(n--){ | |
u8arr[n] = bstr.charCodeAt(n); | |
} | |
return new Blob([u8arr], {type:mime}); | |
} |
/** @type {import('tailwindcss').Config} */ | |
module.exports = { | |
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], | |
theme: { | |
extend: { | |
animation: { | |
fade: 'fadeIn .5s ease-in-out', | |
}, |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Custom Scrollbar</title> | |
<style> | |
.scroll-box { | |
position: relative; | |
width: 300px; /* Adjust to fit your design */ |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Custom Scrollbar</title> | |
<style> | |
.scroll-box { | |
position: relative; | |
width: 300px; /* Adjust to fit your design */ |
// Grab csrf token to get around XSS controls. | |
const csrfToken = JSON.parse(__UNIVERSAL_DATA_FOR_REHYDRATION__.textContent).__DEFAULT_SCOPE__["webapp.app-context"].csrfToken; | |
// Eavesdrop on search requests and create mapping between userId and sec_uid | |
const userIdMapping = new Map(); | |
const realFetch = fetch; | |
window.fetch = (url, ...vars) => { | |
return realFetch(url, ...vars).then(async (res) => { | |
if (url.toString().match(/search\/user\/full/)) { | |
// After getting new results, add block button to them |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Custom Scrollbar</title> | |
<style> | |
.scroll-box { | |
position: relative; | |
width: 300px; /* Adjust to fit your design */ |
Also, do you guys have any resources on algorithms on ASTs, for type checking, maybe about linear typing and borrow checking as well? That's assuming the AST is the place where I'm supposed to check this sort of stuff.
There are a number of different approaches to typechecking, so there isn't a single answer or direction to go. For systems that support strong type inference, there are two well-known approaches: Hindley-Milner (HM) and bidirectional (bidir) systems, and these approaches aren't entirely separate (HM is often put in bidirectional checking to help with generics). There is also the simpler unidirectional approach taken by older languages e.g. Java, and the simpler way of handling generics by annotating every generic function and datastructure.
Giving direction on typechecking is unfortunately difficult because it is opinionated, because there is a line to straddle with wh